﻿<?php

//function to sort an array of arrays by value in each array
function sortByArrayValue($a1, $a2){
	$v1 = $a1['Type'];
	$v2 = $a2['Type'];

	if($v1 == $v2) return 0;
	return $v1 > $v2 ? 1:-1;
}

//from php to javascript showAlert
function showAlert($msg){
  echo "<script>alert('$msg')</script>";
}

?>